<?php

if (!defined('MEDIAWIKI')) {
    echo <<<EOT
Line for LocalSettings.php. 
require_once('extensions/Testwikirc/Testwikirc.php');
EOT;
    exit( 1 );
}

$wgExtensionCredits['specialpage'][] = array(
    'author'    => 'FunPika, Mww113',
    'name'        => 'Testwikirc',
    'svn-date'    => '$LastChangedDate: 2008-10-04 16:14:51 +0000 (Sat, 04 Oct 2008) $',
    'svn-revision'    => '$LastChangedRevision: 43 $',
    'url'         => 'http://code.google.com/p/testwiki-extensions/',
    'description'    => 'Allows trusted users to control the Testwikirc bot.',
    'descriptionmsg' => 'testwikirc-desc',
);

$dir = dirname(__FILE__);

$wgExtensionMessagesFiles['Testwikirc'] = "$dir/Testwikirc.i18n.php";
$wgExtensionAliasesFiles['Testwikirc'] = "$dir/Testwikirc.alias.php";
 
$wgAutoloadClasses['Testwikirc'] = "$dir/Testwikirc_body.php";

$wgSpecialPages['Testwikirc'] = 'Testwikirc';

$wgSpecialPageGroups['Testwikirc'] = 'wiki';

$wgAvailableRights[] = 'testwikirc';
$wgAvailableRights[] = 'testwikirc-log';

$wgGroupPermissions['testwikirc']['testwikirc'] = true;
$wgGroupPermissions['users']['testwikirc-log'] = true;

$wgLogTypes[]                        = 'testwikirc';
$wgLogRestrictions['testwikirc']     = 'testwikirc-log';
$wgLogNames['testwikirc']            = 'twilogpage';
$wgLogHeaders['testwikirc']          = 'twilogpagetext';
$wgLogActions['testwikirc/say' ]     = 'twilog-say-entry';

$wgHooks['LanguageGetSpecialPageAliases'][] = 'TestwikircLocalizedPageName';

function TestwikircLocalizedPageName(&$specialPageArray, $code) {
  wfLoadExtensionMessages('Testwikirc');
  $text = wfMsg('testwikirc');
 
  $title = Title::newFromText($text);
  $specialPageArray['testwikirc']['testwikirc'] = $title->getDBKey();
 
  return true;
}
